package cn.itcast.controller;

import cn.itcast.Service.HydropowerService;
import cn.itcast.feign.pojo.Hydropower;
import cn.itcast.feign.pojo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hydropower")
public class HydropowerController {
    @Autowired
    private HydropowerService hydropowerService;

    @PostMapping("/insert")
    public Result insert(@RequestBody Hydropower hydropower){
        hydropowerService.insert(hydropower);
        return Result.success();
    }

}
